<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // entries()  keys()  values()返回一个遍历器 可以使用for...fo循环进行遍历
        // console.log(['a','b'].keys());

        // keys()对键名遍历
        // values()对值遍历
        // entries()对键值对遍历
        for(let index of ['a','b'].keys()){
            console.log(index);
        }

        for (let ele of ['a','b'].values()){
            console.log(ele)
        }

        for(let [index,ele] of ['a','b'].entries()){
            console.log(index,ele);
        }
        

        // includes()返回一个布尔值，表示某个数组是否包含给定的值
        console.log([1,2,3].includes(2));
        console.log([1,2,3].includes('4'));


        

    </script>
</body>
</html>